/**
 * 
 */
package soa.security.ws;

import javax.jws.WebParam;
import javax.jws.WebService;

import soa.security.exception.OrganizationException;

/**
 * @author CreGu
 *
 */
@WebService
public interface GroupService {
	/**
	 * 组信息新增
	 * 
	 * @param organizationId
	 * @param group
	 * @return
	 * @throws OrganizationException
	 */
	public boolean addGroup(
			@WebParam(name = "organizationId") String organizationId,
			@WebParam(name = "group") String group)
			throws OrganizationException;

	/**
	 * 组信息修改
	 * 
	 * @param organizationId
	 * @param group
	 * @return
	 * @throws OrganizationException
	 */
	public boolean updateGroup(
			@WebParam(name = "organizationId") String organizationId,
			@WebParam(name = "group") String group)
			throws OrganizationException;

	/**
	 * 获取机构内的所有组信息
	 * 
	 * @param organizationId
	 * @return
	 * @throws OrganizationException
	 */
	public String allGroups(
			@WebParam(name = "organizationId") String organizationId)
			throws OrganizationException;

	/**
	 * 获取指定组信息
	 * 
	 * @param organizationId
	 * @param groupId
	 * @return
	 * @throws OrganizationException
	 */
	public String getGroup(
			@WebParam(name = "organizationId") String organizationId,
			@WebParam(name = "groupId") String groupId)
			throws OrganizationException;

	/**
	 * 以下为关系服务
	 */

	public boolean addPersons(
			@WebParam(name = "organizationId") String organizationId,
			@WebParam(name = "groupId") String groupId,
			@WebParam(name = "personIds") String personIds)
			throws OrganizationException;

	public boolean removePersons(
			@WebParam(name = "organizationId") String organizationId,
			@WebParam(name = "groupId") String groupId,
			@WebParam(name = "personIds") String personIds)
			throws OrganizationException;

	public String allPersons(
			@WebParam(name = "organizationId") String organizationId,
			@WebParam(name = "groupId") String groupId)
			throws OrganizationException;

	public boolean addSubGroups(
			@WebParam(name = "organizationId") String organizationId,
			@WebParam(name = "groupId") String groupId,
			@WebParam(name = "subGroupIds") String subGroupIds)
			throws OrganizationException;

	public boolean removeSubGroups(
			@WebParam(name = "organizationId") String organizationId,
			@WebParam(name = "groupId") String groupId,
			@WebParam(name = "subGroupIds") String subGroupIds)
			throws OrganizationException;

	public String allSubGroups(
			@WebParam(name = "organizationId") String organizationId,
			@WebParam(name = "groupId") String groupId)
			throws OrganizationException;
}
